﻿// /////////////////////////////////// 
//  
//  
//      WiseLink CCF2.0 
//     (c)Copyright 2001-2010 WiseLink Xiaojun (David) Chen 
//        Authored and Owned Xiaojun (David) Chen 
//        All Right Reserved
//  
// /////////////////////////////////// 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZICModel.Fault
{
    public interface IFaultHandler
    {
        bool Process();

    }
    public class Header
    {
        public int SrcFaultId { get; set; }
        public int Ids { get; set; }
        public string EquipmentId { get; set; }
        public int Mileage { get; set; } //故障里程 
        public short Version { get; set; } //故障码库
        public int MainFaultCount { get; set; } //主系统故障数
        public DateTime? ReceiveTime { get; set; }//故障收到时间
        public DateTime? GPSTime { get; set; } //故障发生时间
        public string Idc { get; set; }
        public bool IsValid { get; set; }
        public FaultType CurrentFaultType { get; set; }
        public string Longitude { get; set; }
        public string Latitude { get; set; }

        public Header()
        {
            IsValid = false;
        }

    }

    public enum FaultType
    {
        Fault =0,  //0：故障
        Urgent =1  //1: 求救
    }

 

  

    public class Body
    {
        public List<MainFaultDetail> ZISMainFaultList { get; set; }

        public Body()
        {
            ZISMainFaultList = new List<MainFaultDetail>();
        }

    }

    public class Urgent
    {
        public int? CarStatus { get; set; } //故障里程 
        public int SrcFaultId { get; set; } //ZIS 故障ID
        public DateTime? ReceiveTime { get; set; }//故障收到时间
        public DateTime? GPSTime { get; set; } //故障发生时间
        public string Idc { get; set; }
        public decimal? Longitude { get; set; }
        public decimal? Latitude { get; set; }
      
    }

    public class FaultBase
    {
        public Header FaultHeader { get; set; }
        public Body FaultBody { get; set; }
        public GpsOutEquipmentHistory OriginalFault { get; set; }
        
        public FaultBase(GpsOutEquipmentHistory originalFulat) 
        {
            
            OriginalFault = originalFulat;
        }
    }
}
